using Microsoft.CSharp.RuntimeBinder;

namespace Todo;

public class PasswordMd5
{
    public static string md5(string password)
    {
        if (!password.Trim().Equals(""))
        {
            using (var md5 = System.Security.Cryptography.MD5.Create())
            {
                byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(password);
                byte[] hashBytes = md5.ComputeHash(inputBytes);
                return BitConverter.ToString(hashBytes).Replace("-", "").ToLower();
            }
        }
        return password;
    }
}